package com.fashopcliente.vo;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.NotNull;
import javax.persistence.ManyToOne;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.OneToMany;

@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class Local {

    /**
     */
    @NotNull
    private Long idlocal;

    /**
     */
    @NotNull
    private String nombre;

    /**
     */
    @NotNull
    private String descripcion;

    /**
     */
    @NotNull
    private String gps;

    /**
     */
    @NotNull
    private String direccion;

    /**
     */
    @ManyToOne
    private Empresa empresa_idempresa;

    /**
     */
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "local_idlocal")
    private Set<Producto> idproducto = new HashSet<Producto>();

    /**
     */
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "local_idlocal")
    private Set<Lugar> idlugar = new HashSet<Lugar>();
}
